﻿
@using Omu.Awesome.Mvc.Helpers
@model INSE6260.OnlineBanking.Service.Messaging.TransactionService.TransferFundRequest

@{
    ViewBag.Title = "Transfer Fund";
}

<h2>Transfer Fund</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@Html.Confirm(new ConfirmParams { CssClass = "confirm", Height = 180, Width = 400, Message = "Do you confirm transfer transaction?", NoText = "Cancel", Title = "Confirm", YesText = "Confirm" })
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend></legend>
        
        <div class="editor-label">
            Source Account:
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.SourceAccountId, (SelectList)ViewBag.SourceAccounts, new { @width ="500px" })
            @Html.ValidationMessageFor(model => model.SourceAccountId)
        </div>

        <div class="editor-label">
            Destination Account:
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.DestinationAccountId, (SelectList)ViewBag.DestinationAccounts)
            @Html.ValidationMessageFor(model => model.DestinationAccountId)
        </div>
        <div class="editor-label">
            Amount:
        </div>
        
        <div class="editor-field" >
            @Html.EditorFor(model => model.Amount)
            @Html.ValidationMessageFor(model => model.Amount)
        </div>

        <p>
            <input type="submit" value="Confirm" class="confirm khbtn" />
            @Html.ActionLink("Cancel", "Index", "Home",null, new { @class = "khbtn" })
            @Html.ActionLink("Transfer to an external account", "TransferFundExternal", "Transaction", null, new { @class = "khbtn" })
        </p>
    </fieldset>
}

